[release-4.21] CNTRLPLANE-3873: Backport controlPlaneVersion status to release-4.21#9054
Conversation
…nent versions Add ControlPlaneVersionStatus and ControlPlaneUpdateHistory types to HostedClusterStatus and HostedControlPlaneStatus. These track management-side control plane component versions independently from CVO, enabling service providers to detect completed control plane upgrades and compute NodePool version skew without waiting for data-plane rollout. Ref: CNTRLPLANE-2914 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Ahmed Abdalla <aabdelre@redhat.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@devguyio: This pull request references CNTRLPLANE-2914 which is a valid jira issue. Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target either version "4.21." or "openshift-4.21.", but it targets "openshift-4.22" instead. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository: openshift/coderabbit/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: devguyio The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@devguyio: This pull request references CNTRLPLANE-3873 which is a valid jira issue. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository. |
There was a problem hiding this comment.
Hey Ahmed, the core cherry-pick looks clean — the source code is identical to #7887. A couple of things I noticed:
The PR description says "Add WaitForControlPlaneRollout e2e helper (gated to 4.21+)" and "Add WaitForImageRollout deprecated alias for WaitForDataPlaneRollout", but I don't see those changes in the diff. The original PR (#7887) had 7 e2e files that aren't here:
test/e2e/util/controlplaneversion.go(isControlPlaneVersionCompleted,controlPlaneVersionSteadyState)test/e2e/util/upgrade_safe_check.go(113 lines)test/e2e/util/util.go(WaitForImageRollout→WaitForDataPlaneRollout+WaitForControlPlaneRollout)test/e2e/util/hypershift_framework.go(UpgradeContext)test/e2e/control_plane_upgrade_test.go,upgrade_hypershift_operator_test.go,karpenter_test.go
The parent epic CNTRLPLANE-3872 lists "E2E test coverage validates the backported functionality" in its acceptance criteria. Are the e2e changes coming in a follow-up PR, or were they lost during the cherry-pick? If the release-4.21 e2e framework is structured differently and the cherry-pick doesn't apply cleanly, that's fine — just want to make sure there's a plan.
Also,
- The description should be updated to match what's actually in the diff.
- Right now it claims e2e helpers that aren't here.
- And last but not least verify test is failing due to lint issues
| # When not otherwise set, diff/lint against the local main branch. | ||
| # This is always set in OpenShift CI. | ||
| PULL_BASE_SHA ?= main | ||
|
|
There was a problem hiding this comment.
FYI — on main, PULL_BASE_SHA now has auto-detection of the upstream remote (git remote -v | grep openshift/hypershift). The simpler ?= main here is fine for the backport since that infra wasn't on release-4.21.
… and docs Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tatus Implement reconcileControlPlaneVersion() that aggregates ControlPlaneComponent status into hcp.Status.ControlPlaneVersion with version transition logic, image-only change detection, and observedGeneration tracking. Include pruneHistory() ported from CVO's weighted ranking algorithm with exact constants to cap history at 100 entries. Ref: CNTRLPLANE-2914 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Ahmed Abdalla <aabdelre@redhat.com>
Deep-copy controlPlaneVersion from HostedControlPlane status to HostedCluster status, following the existing Platform field propagation pattern. Handles nil gracefully for version skew safety during rolling upgrades. Ref: CNTRLPLANE-2914 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Ahmed Abdalla <aabdelre@redhat.com>
74d1d3a to
7f0eb92
Compare
|
/pipeline required |
|
Scheduling required tests: |
|
@devguyio: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Summary
Cherry-pick of #7887 (CNTRLPLANE-2914: Add controlPlaneVersion status to HostedCluster and HostedControlPlane) to release-4.21.
This backport adds the
controlPlaneVersionstatus field toHostedClusterandHostedControlPlane, providing a management-side view of control plane component rollout status independent of the CVO.Changes
ControlPlaneVersionStatusandControlPlaneUpdateHistoryAPI typesreconcileControlPlaneVersionaggregation logic in CPOpruneHistorywith CVO weighted ranking algorithmcontrolPlaneVersionfrom HCP to HC statusWaitForControlPlaneRolloute2e helper (gated to 4.21+)WaitForImageRolloutdeprecated alias forWaitForDataPlaneRolloutConflict Resolution
Configurationfield in applyconfiguration types preserved (exists in 4.21, not in original feature branch base)WaitForControlPlaneComponentRollout(existing 4.21 function) preserved alongside newWaitForControlPlaneRolloutVersion422toVersion421for backport contextRef: #7887